<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var getName = function () {
        console.log(1);
      };

      function Foo() {
        getName = function () {
          console.log("Foo.getName");
        };
        console.log(this.getName);
        return this;
      }
      function Dog() {
        this.eat = function () {
          console.log("eat");
        };
      }
      const dog = new Dog()
      console.log(dog.eat());
      console.log(Foo());
      console.log(this.getName);

      const obj = new Object()
      console.log(obj);
    </script>
  </body>
</html>
